public class Types3 {
    /*
            算术运算符
            +，-，*，/，%，++，--
     */
    public static void main(String[] agrs) {
        int num1 = 8;
        num1++;
        //相当于num1=num1+1
        ++num1;
        //相当于num1=num1+1
        System.out.println(num1);
        int num2 = 3;
        int num3 = num2++;
        int num4 = ++num2;
        //先把num2赋值给num3，num3=3，num2=3+1=4；
        System.out.println(num2);
        System.out.println(num3);
        System.out.println(num4);
        System.out.println(++num3);
        System.out.println("---".repeat(30));
        int num5 = 10;
        num5--;
        --num5;
        System.out.println(num5);
        int num6 = 21;
        int num7 = num6--;
        System.out.println(--num7);
        System.out.println(num6);

    }
}
